﻿
using System.Windows.Forms;
using SQLDiagConfiguration.Properties;
namespace SQLDiagConfiguration
{
    /// <summary>
    /// This page is used to welcome the user and to provide basic instructions
    /// </summary>
    public partial class WelcomePage : BasePage
    {
        #region Constructor
        public WelcomePage(DiagInfoObject obj)
        {
            DiagInfo = obj;
            IsEditable = false;
            InitializeComponent();
        }
        #endregion Constructor
        public override void  LoadControlText()
        {
            //base.LoadControlText();
            txtWelcomePage.Text = Resources.strWelcomePage;
            gbVersionDefault.Text = Resources.strgbVersion;
        }

        private void Version_CheckedChanged(object sender, System.EventArgs e)
        {
            RadioButton rb = sender as RadioButton;
            DiagInfo.ConfigPath = Resources.strVersionPath;
            DiagInfo.ConfigFile = rb.Tag.ToString();
            SQLDiagConfigurationOptions p = this.Parent.Parent as SQLDiagConfigurationOptions;
            p.LoadConfigFile(false);
        }
    }
}
